{% extends "adibilisadminBundle::layout.html.twig" %}

{% block title %}
  Modification de commande - {{ parent() }}
{% endblock %}

{% block adibilisadmin_body %}
 {% if app.session.hasFlash('info') %}
          <div class="alert alert-success">
              {{ app.session.flash('info') }}
          </div>
  {% endif %}


<h1>Détails de la commande</h1>


<div class="well">
    <p><b>{{ 'profile.show.username'|trans({}, 'FOSUserBundle') }}: </b> {{ entity.user.username }}</p>
    <p><b> {{ 'profile.show.email'|trans({}, 'FOSUserBundle') }}: </b> {{ entity.user.email }}</p>
    <p><b> Prénom : </b> {{ entity.user.firstname }}</p>
    <p><b> Nom : </b> {{ entity.user.lastname }}</p>
    <p><b> Adresse : </b> {{ entity.user.address }}</p>
    <p><b> Téléphone : </b> {{ entity.user.telephone }}</p>
    <p><b> Localité : </b> {{ entity.user.locality.locality }}</p>

     </br>

    <p><b> Date de la commande : </b> {{ entity.date|date('Y-m-d H:i:s') }}</p>
    <p><b> Id de la commande : </b> {{ entity.id }}</p>



    

</div>

<h1>Modification de la commande</h1>

<div class="well">

<form action="{{ path('passorder_update', { 'id': entity.id }) }}" method="post" {{ form_enctype(edit_form) }}>
    {{ form_widget(edit_form) }}
</br> </br>
    <p>
       <button type="submit" class="btn btn-primary">Valider le changement</button>
    </p>
    </p>
</form>



        <form action="{{ path('passorder_delete', { 'id': entity.id }) }}" method="post">
            {{ form_widget(delete_form) }}
            <button type="submit" class="btn btn-danger" >Supprimer la commande</button>
        </form>


</div>


        <a href="{{ path('passorder_list') }}" class="btn">
      <i class="icon-chevron-left"></i>
                Retour à la liste
        </a>

    </br> </br>

{% endblock %}